class Dog {
  constructor(name) {
    this.name = name;
  }

  bark() {
    return `Woof!`;
  }
}

const dog1 = new Dog("Daisy");
const dog2 = new Dog("Max");
const dog3 = new Dog("Spot");

// console.log(Dog.prototype);
// constructor: ƒ Dog(name, breed) bark: ƒ bark()
 
// console.log(dog1.__proto__);
// constructor: ƒ Dog(name, breed) bark: ƒ bark()

Dog.prototype.play = () => console.log("Playing now!");

dog1.play();

class SuperDog extends Dog {
  constructor(name) {
    super(name);
  }
 
  fly() {
    return "Flying!";
  }
}

const flyDog1 = new SuperDog("Daisy");
console.log(flyDog1.bark());
console.log(flyDog1.fly());